##	  Copyright 2012, Geoffrey GROFF and Dimitri SEGARD
##	  This file is part of otaku-loader.
##
##    otaku-loader is free software: you can redistribute it and/or modify
##    it under the terms of the GNU General Public License as published by
##    the Free Software Foundation, either version 3 of the License, or
##    (at your option) any later version.
##
##    otaku-loader is distributed in the hope that it will be useful,
##    but WITHOUT ANY WARRANTY; without even the implied warranty of
##    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
##    GNU General Public License for more details.
##
##    You should have received a copy of the GNU General Public License
##    along with otaku-loader.  If not, see <http://www.gnu.org/licenses/>.

import re

p_ = re.compile(r'^[^a-z]', re.IGNORECASE)
p_a = re.compile(r'^a', re.IGNORECASE)
p_b = re.compile(r'^b', re.IGNORECASE)
p_c = re.compile(r'^c', re.IGNORECASE)
p_d = re.compile(r'^d', re.IGNORECASE)
p_e = re.compile(r'^e', re.IGNORECASE)
p_f = re.compile(r'^f', re.IGNORECASE)
p_g = re.compile(r'^g', re.IGNORECASE)
p_h = re.compile(r'^h', re.IGNORECASE)
p_i = re.compile(r'^i', re.IGNORECASE)
p_j = re.compile(r'^j', re.IGNORECASE)
p_k = re.compile(r'^k', re.IGNORECASE)
p_l = re.compile(r'^l', re.IGNORECASE)
p_m = re.compile(r'^m', re.IGNORECASE)
p_n = re.compile(r'^n', re.IGNORECASE)
p_o = re.compile(r'^o', re.IGNORECASE)
p_p = re.compile(r'^p', re.IGNORECASE)
p_q = re.compile(r'^q', re.IGNORECASE)
p_r = re.compile(r'^r', re.IGNORECASE)
p_s = re.compile(r'^s', re.IGNORECASE)
p_t = re.compile(r'^t', re.IGNORECASE)
p_u = re.compile(r'^u', re.IGNORECASE)
p_v = re.compile(r'^v', re.IGNORECASE)
p_w = re.compile(r'^w', re.IGNORECASE)
p_x = re.compile(r'^x', re.IGNORECASE)
p_y = re.compile(r'^y', re.IGNORECASE)
p_z = re.compile(r'^z', re.IGNORECASE)


alphabet = {
    '-':p_,
    'a':p_a,
    'b':p_b,
    'c':p_c,
    'd':p_d,
    'e':p_e,
    'f':p_f,
    'g':p_g,
    'h':p_h,
    'i':p_i,
    'j':p_j,
    'k':p_k,
    'l':p_l,
    'm':p_m,
    'n':p_n,
    'o':p_o,
    'p':p_p,
    'q':p_q,
    'r':p_r,
    's':p_s,
    't':p_t,
    'u':p_u,
    'v':p_v,
    'w':p_w,
    'x':p_x,
    'y':p_y,
    'z':p_z}
